package indi.kider.server.invoice.service;

import indi.kider.common.model.invoice.Invoice;
import indi.kider.common.model.invoice.InvoiceLogQuery;
import indi.kider.common.model.invoice.InvoiceLogs;
import pers.vankid.common.model.base.CoreException;
import pers.vankid.common.utils.page.PageRequest;
import pers.vankid.common.utils.page.PageResponse;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface InvoiceService {
    /**
     * 建档
     *
     * @param invoice
     * @return
     */
    Invoice add(Invoice invoice);

    /**
     * 买入/拆回 进
     * 报废/装出 出
     *
     * @param logs
     * @return
     */
    List<Invoice> manage(List<InvoiceLogs> logs) throws CoreException;

    /**
     * 买入/拆回
     * 进
     *
     * @param logs
     * @return
     */
    List<Invoice> plus(List<InvoiceLogs> logs);

    /**
     * 报废/装出
     * 出
     *
     * @param logs
     * @return
     */
    List<Invoice> minus(List<InvoiceLogs> logs) throws CoreException;

    /**
     * 查询资产列表（不分页）
     *
     * @param invoice
     * @return
     */
    List<Invoice> query(Invoice invoice);

    /**
     * 查询资产列表（分页）
     *
     * @param request
     * @return
     */
    PageResponse<Invoice> query(PageRequest<Invoice> request);

    /**
     * 查询资产操作列表（分页）
     *
     * @param request
     * @return
     */
    PageResponse<InvoiceLogQuery> queryLogs(PageRequest<InvoiceLogQuery> request);
}
